/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.elcom.config;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.FileUtils;

/**
 *
 * @author GiangLT
 */
public class ModuleConfig extends AbstractReloadConfig {

    @Override
    public void createDefaultConfigFile(File fout) throws IOException {
        List<String> lines = new ArrayList<String>();

        lines.add("<?xml version=\"1.0\" ?>");
        lines.add("\t<properties>");

        lines.add("\t\t<category name=\"general\">");
        lines.add("\t\t\t<property name=\"blacklistFile\" value=\"C:\\Users\\GiangLT\\config\\mo_blacklist.txt\"/>");
        lines.add("\t\t\t<property name=\"reloadConfigCommand\" value=\"smsg_xcore,reload,routing_rule\"/>");
        lines.add("\t\t</category>");

        lines.add("\t\t<category name=\"executor\">");
        lines.add("\t\t\t<property name=\"initialDelayMs\" value=\"1000\"/>");
        lines.add("\t\t\t<property name=\"periodMs\" value=\"30000\"/>");
        lines.add("\t\t</category>");

        lines.add("\t\t<category name=\"database\">");
        lines.add("\t\t\t<property name=\"url\" value=\"jdbc:oracle:thin:@//192.168.7.146:1521/orcl\"/>");
        lines.add("\t\t\t<property name=\"username\" value=\"livescreen\"/>");
        lines.add("\t\t\t<property name=\"password\" value=\"livescreen\"/>");
        lines.add("\t\t\t<property name=\"classDriverName\" value=\"oracle.jdbc.OracleDriver\"/>");
        lines.add("\t\t</category>");

        lines.add("\t</properties>");

        FileUtils.writeLines(fout, lines);
    }
}
